#include "Csdl.h"
#include "functions.h"

#include "Cmusic.h"
#include "Csound.h"


SDL_Event event;

Uint8 *keystate=SDL_GetKeyState(NULL);



int main( int argc, char* args[] )
{


	Csdl sdl(true,true);
	sdl.SetVideoMode(400,300,false,32,"aaa");
	

	bool exit=false;	


Csound m("music/beat.wav");
Csound a("music/scratch.wav");


	while(!exit)
	{
		if(SDL_PollEvent(&event))
		{
			if(event.type==SDL_QUIT)exit=true;

		}

	
	
		if(keystate[SDLK_ESCAPE])exit=true;
		sdl.ScreenRefresh();
			if(keystate[SDLK_1])m.play(2);
			if(keystate[SDLK_3])a.play(4);
			if(keystate[SDLK_2])m.stop();




	}

	


	return 0;
}

